import request from "@/utils/request.js";

export function login(userName, password) {
    return request({
        url: '/login',
        method: 'post',
        data: {
            userName,
            password
        }
    })
}

export function getInfo() {
    return request({
        url: '/getInfo',
        method: 'get'
    })
}

export function logout() {
    return request({
        url: '/logout',
        method: 'post'
    })
}

export function modifyPwd(data) {
    return request({
        url: '/modifyPwd',
        method: 'put',
        data: data
    })
}

export function modifyAvatar(data) {
    return request({
        url: '/modifyAvatar',
        method: 'put',
        data: data
    })
}

